Calculating observed and expected counts
All statistical significance tests start with a null hypothesis (
) that asserts that no real effect
is present in the population, and any effect you think you see in your sample is due only to random
fluctuations. (See Chapter 3 for more information.) The
for the chi-square test asserts that
there’s no association between the levels of the row variable and the levels of the column
variable, so you should expect the relative spread of cell counts across the columns to be the
same for each row.
Figure 12-1 shows how this works out for the observed data taken from the example in this chapter’s
introduction. You can see from the marginal “Total” row that the overall rate of pain relief (for both
groups combined) is 43/100, or 43 percent.
© John Wiley & Sons, Inc.
FIGURE 12-1: The observed results comparing CBD to NSAIDs for the treatment of pain from chronic arthritis.
Figure 12-1 presents the actual data you observed from your survey, where the observed counts are
placed in each of the four cells. As part of the chi-square test statistic calculation, you now need to
calculate an expected count for each cell. This is done by taking the product of the row and column
marginals and dividing them by the total. So, to determine the expected count in the CBD/pain relief
cell, you would multiply 43 (row marginal) by 60 (column marginal), then divide this by 100 (total)
which comes out 25.8. Figure 12-2 presents the fourfold table with the expected counts in the cells.